package com.amos.muexamclient.sys.mapper;

import com.amos.muexamclient.sys.entity.SysRoleEntity;
import com.amos.muexamclient.sys.service.dto.SysRoleDTO;
import com.amos.muexamcore.core.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;


/**
 * Copyright © 2018 五月工作室. All rights reserved.
 *
 * @Package com.amos.muexamclient.sys.mapper
 * @ClassName SysRoleDao
 * @Description TODO
 * @Author Amos
 * @Modifier
 * @Date 2020-03-24 14:35:56
 * @Version 1.0
 **/
@Mapper
public interface SysRoleMapper extends BaseMapper<SysRoleEntity, SysRoleDTO> {

    /**
     * 根据用户信息查询角色权限
     *
     * @param id
     * @return
     */
    Set<SysRoleEntity> selectRolePermissionByUserId(@Param("userId") String id);

    List<SysRoleDTO> selectRoleByUserId(@Param("userId") String id);

    List<SysRoleDTO> getRoleByKey(@Param("roleKey") String roleKey);

    int deleteRoleByids(@Param("array") String[] roleIds);

    List<SysRoleDTO> optionSelect();
}